/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.hcht.xrlh.sx.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.hcht.xrlh.sx.entity.DrSx;
import com.hcht.xrlh.sx.dao.DrSxDao;

/**
 * 双随机事项管理Service
 * @author lrz
 * @version 2016-12-19
 */
@Service
@Transactional(readOnly = true)
public class DrSxService extends CrudService<DrSxDao, DrSx> {

	@Autowired
	DrSxDao dao;
	
	public DrSx get(String id) {
		return super.get(id);
	}
	
	public List<DrSx> findList(DrSx drSx) {
		return super.findList(drSx);
	}
	
	public Page<DrSx> findPage(Page<DrSx> page, DrSx drSx) {
		return super.findPage(page, drSx);
	}

	public Page<DrSx> findPage2(Page<DrSx> page, DrSx drSx) {
		drSx.setPage(page);
		page.setList(dao.findList2(drSx));
		return page;
		//return dao.findList2(drSx);
	}
	
	public Page<DrSx> findPageAll(Page<DrSx> page, DrSx drSx) {
		drSx.setPage(page);
		page.setList(dao.findListMain(drSx));
		return page;
	}
	
	@Transactional(readOnly = false)
	public void save(DrSx drSx) {
		super.save(drSx);
	}

	@Transactional(readOnly = false)
	public String save_r(DrSx drSx) {
		
		return super.save_r(drSx);
	}
	
	@Transactional(readOnly = false)
	public void delete(DrSx drSx) {
		super.delete(drSx);
	}
	
}